package 字符串;

import java.util.Scanner;

public class 大小写转换 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();

        char[] a = str.toCharArray();

        for (int i = 0; i < a.length; i++) {
            if (a[i]>=97){
                a[i] = (char) (a[i]-32);
            }
            else {
                a[i] = (char) (a[i] +32);
            }
        }

        System.out.println(a);
    }
}
